package server;

import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.net.ServerSocket;
import java.net.Socket;

public class MainServer {
    public static void main(String[] args) throws Exception {
        System.out.println("服务器");
        ServerSocket serverSocket = new ServerSocket(5566);
        int count = 0;
        while (true) {
            Socket socket = serverSocket.accept();
            new ThreadServer(socket).start();
            System.out.println("目前客户端的数量是:" + (++count));
        }

    }
}
